from django.contrib import admin
from django.urls import path, include
# from rest_framework_swagger.views import get_swagger_view
#
# # 获取生成接口文档的视图函数
# schema_view = get_swagger_view(title='项目接口文档')
from rest_framework.routers import DefaultRouter

from course2.views import show_coudet, show_coucomments, CourseViewSet, show_chapters, add_comment, \
    del_comment, gen_sturecord, del_sturecord, TeacherViewSet, gen_order, go_pay

# from course2.views show_courses

urlpatterns = [
    # path('api/courses/', show_courses),
    path('api/coudet/', show_coudet),
    path('api/coucoms/', show_coucomments),
    path('api/couchaps/', show_chapters),
    path('api/genrecord/', gen_sturecord),
    path('api/addcom/', add_comment),
    path('api/delcom/', del_comment),
    path('api/delrecord/', del_sturecord),
    path('api/addorder/', gen_order),
    path('api/gopay/', go_pay),
]

router = DefaultRouter()
router.register('api/courses',CourseViewSet)
router.register('api/teachers',TeacherViewSet)
urlpatterns += router.urls